import request from '@/utils/request'

// api地址
const api = {
	getSetting: 'index/getSetting',
	getPhotoList: 'index/getPhotoList',
	getCategory: 'index/getCategory',
	addLikes: 'index/addLikes',

	addCart: 'cart/add',
	cartList: 'cart/list',
	deleteCart: 'cart/delete',
	payDirectPhotoBuy: 'photoLive/directPhotoBuy',
	faceSearchPhoto: 'index/faceSearchPhoto',
	getFreePhotoList: 'index/getFreePhotoList',
	myReward: 'index/myReward',
	myPhoto: 'index/myPhoto',
	getWxUserInfo: 'passport/getWxUserInfo',
	payReward: 'photoLive/reward',
	payCart: 'photoLive/cart',
	faceSearchWithUpload: 'index/faceSearchWithUpload',
	getJumpDownLoadUrl: 'index/getJumpDownLoadUrl',
	batchPhotoBuy: 'photoLive/batchPhotoBuy',
	getAuthUrl: 'passport/getAuthUrl',
	payAccess: 'photoLive/payAccess'
}
// 首页信息
export const api_getSetting = (param) => {
	return request.post(api.getSetting, param)
}
// 分类信息
export const api_getCategory = (param) => {
	return request.post(api.getCategory, param)
}
// 图片列表
export const api_getPhotoList = (param) => {
	return request.post(api.getPhotoList, param)
}
// 购物车
export const api_cartList = (param) => {
	return request.post(api.cartList, param)
}
// 购物车支付
export const api_payCart = (param) => {
	return request.post(api.payCart, param)
}
// 删除购物车 deleteCart
export const api_deleteCart = (param) => {
	return request.post(api.deleteCart, param)
};
// 获取下载链接
export const api_getJumpDownLoadUrl = (param) => {
	return request.post(api.getJumpDownLoadUrl, param)
}

export const api_batchPhotoBuy = (param) => {
	return request.post(api.batchPhotoBuy, param)
}
export const api_addCart = (param) => {
	return request.post(api.addCart, param)
}

export const api_payReward = (param) => {
	return request.post(api.payReward, param)
}
export const api_addLikes = (param) => {
	return request.post(api.addLikes, param)
}
export const api_getFreePhotoList = (param) => {
	return request.post(api.getFreePhotoList, param)
}
export const api_payDirectPhotoBuy = (param) => {
	return request.post(api.payDirectPhotoBuy, param)
}

export const api_getmyPhoto = (param) => {
	return request.post(api.myPhoto, param)
}
export const api_getmyReward = (param) => {
	return request.post(api.myReward, param)
}

export const api_faceSearchWithUpload = (param) => {
	return request.post(api.faceSearchWithUpload, param)
}


export const api_faceSearchPhoto = (param) => {
	return request.post(api.faceSearchPhoto, param)
}

// 登录
export const api_getAuthUrl = (param) => {
	return request.post(api.getAuthUrl, param)
}

export const api_payAccess = (param) => {
	return request.post(api.payAccess, param)
}